package model

import (
	"time"
)

type Courses struct {
	Id         uint64    `gorm:"column:id;type:bigint UNSIGNED;primaryKey;not null;" json:"id"`
	CreatedAt  time.Time `gorm:"column:created_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"created_at"`
	UpdatedAt  time.Time `gorm:"column:updated_at;type:datetime(3);not null;default:CURRENT_TIMESTAMP(3);" json:"updated_at"`
	DeletedAt  time.Time `gorm:"column:deleted_at;type:datetime(3);default:NULL;" json:"deleted_at"`
	Title      string    `gorm:"column:title;type:varchar(255);comment:课程标题;not null;" json:"title"`         // 课程标题
	UserName   string    `gorm:"column:user_name;type:varchar(255);comment:讲师名称;not null;" json:"user_name"` // 讲师名称
	Look       int64     `gorm:"column:look;type:bigint;comment:浏览播放量;not null;" json:"look"`                // 浏览播放量
	Enrollment int64     `gorm:"column:enrollment;type:bigint;comment:报名人数;not null;" json:"enrollment"`     // 报名人数
	Image      string    `gorm:"column:image;type:varchar(255);comment:封面海报;not null;" json:"image"`         // 封面海报
	UserId     int64     `gorm:"column:user_id;type:bigint;comment:用户id;not null;" json:"user_id"`           // 用户id
	VideoId    int64     `gorm:"column:video_id;type:bigint;comment:视频id;not null;" json:"video_id"`         // 视频id
}
